<template>
  <CraneForm :schema="schema" @form-submit="submit" />
</template>

<script setup lang="ts">
import { CraneForm } from 'crane-element';
import { ref } from 'vue';
import { CraneSchema } from 'crane-element/lib/components/CraneForm/types';

const schema = ref<CraneSchema>({
  properties: {
    password: {
      type: 'password',
      title: '密码'
    }
  }
});

const props = defineProps({
  close: {
    type: Function,
    required: true
  }
});

const submit = (e: any) => {
  props.close(e);
};
</script>

<style scoped lang="less"></style>
